package pro.ticktock.base.tree.impl;

/**
 * @author lambert
 * @created 18-9-30
 */
public abstract class AbstractTreeNode<T extends TypedTreeNode<T, NV>, NV> implements TypedTreeNode<T, NV> {

  protected T parent;
  protected NV value;

  @Override
  public T getParent() {
    return parent;
  }

  @Override
  public final void setParent(T parent) { //more actions shall be performed at addChild
    this.parent = parent;
  }

  @Override
  public void setValue(NV value) {
    this.value = value;
  }

  @Override
  public NV getValue() {
    return value;
  }
}
